<template>
  <wd-popup v-model="isshow" custom-style="border-radius:20rpx 20rpx 0 0" @close="handleClose" position="bottom">
    <view class="uiSelect">
      <view class="us-header">
        <view class="us-btn b2" @tap="onCancel">取消</view>
        <view class="us-btn b1" @tap="onConfirm">确定</view>
      </view>
      <view class="us-search" v-if="search == 1">
        <wd-search placeholder="请输入企业名称" cancel-txt="搜索" placeholder-left />
      </view>
      <view class="us-picker">
        <wd-picker-view :columns="columns" v-model="value" @change="onChange" />
      </view>
    </view>
  </wd-popup>
</template>
<script>
export default {
  data() {
    return {
      isshow: false,
      value: '',
      columns: ['选项1', '选项2', '选项3', '选项4', '选项5', '选项6', '选项7'],
      search: 0
    }
  },
  methods: {
    onChange() {},
    handleClose() {},
    onConfirm() {},
    hide() {
      this.isshow = false
    },
    show(options) {
      this.search = options.search || 0
      this.isshow = true
    },
    onCancel() {
      this.hide()
    },
    onConfirm() {
      console.log(this.value)
      this.hide()
    }
  }
}
</script>
